<template>
    <div>
        {{ formate() }}
    </div>
</template>

<script setup>
    import { ref } from 'vue';

    const date = ref(new Date());

    function formate() {
        var dt = date.value;
        var y = dt.getFullYear();
        var m = dt.getMonth()+1;
        var d = dt.getDate();
        return `${y}-${m}-${d}`
    }
</script>

<style>

</style>